﻿#pragma execution_character_set("utf-8")
#include "NoonState.h"
#include <QDebug>
#include "AfternoonState.h"

NoonState::NoonState()
{

}

void NoonState::WriteProgram(shared_ptr<Work> work)
{
    if (work->getHour() < 13) {
        qDebug() << QString("当前时间：%1点 饿了；犯困，午休。").arg(work->getHour());
    }
    else {
        work->setCurrent(shared_ptr<AfternoonState>(new AfternoonState()));
        work->WriteProgram();
    }
}
